package com.coffee.order.api.sku.service;

import com.coffee.core.entity.Page;
import com.coffee.core.entity.PagerInfo;
import com.coffee.core.exception.BusinessException;
import com.coffee.order.api.sku.req.HostRegionalSkuSalesInformationReq;
import com.coffee.order.api.sku.req.HostSkuSalesInformationReq;
import com.coffee.order.api.sku.result.PeriodizationSkuResult;
import com.coffee.sku.api.sku.req.MerchantSkuListReq;
import com.coffee.sku.api.sku.req.SkuListReq;
import com.coffee.sku.api.sku.result.MerchantSkuListResult;
import com.coffee.sku.api.sku.result.PeriodizationSkuDetailResult;
import com.coffee.sku.api.sku.result.PeriodizationSkuListResult;
import com.coffee.sku.api.sku.result.SkuListResult;

import java.util.List;
import java.util.Map;
import java.util.Set;


public interface PeriodizationSkuService {

    Page<PeriodizationSkuListResult> getPager(SkuListReq param, PagerInfo pr);

    PeriodizationSkuDetailResult getDetail(Integer skuId);

    List<MerchantSkuListResult> getMerchantSkuListResult(MerchantSkuListReq req);


    void delete(Integer id);

    void deleteBySkuId(Integer id);

    //添加主商品
    Integer add(PeriodizationSkuResult result) throws BusinessException;

    //替换主商品
    Integer update(PeriodizationSkuResult result) throws BusinessException;

    Integer updateIsEnable(Integer skuId, String isEnable) throws BusinessException;

    void addBySkuIds(Integer hostSkuId, List<Integer> skuIds) throws BusinessException;

    void deleteViceSku(Integer hostSkuId, Integer skuId) throws BusinessException;

    Map<Integer, PeriodizationSkuResult> getItemMap(Set<Integer> idSet);

    //添加商品规格
    Integer addHostSkuSalesInformation(HostSkuSalesInformationReq req) throws BusinessException;

    Integer deleteHostSkuSalesInformation(Integer id, Integer hostSkuId) throws BusinessException;

    //添加
    void addHostRegionalSkuSalesInformationReq(Integer skuId, List<HostRegionalSkuSalesInformationReq> reqs) throws BusinessException;

    //修改
    void updateHostRegionalSkuSalesInformationReq(Integer hostSkuId, Integer skuId, List<HostRegionalSkuSalesInformationReq> reqs) throws BusinessException;

}